<admintpl file="header" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('Attendance/index')}">考勤管理</a></li>
            <if condition="session('ADMIN_ID') eq 1 OR $userrole['role'] eq 1">
            	<li><a href="{:U('Attendance/add')}">新增考勤</a></li>
            </if>
        </ul>
        <form class="well form-search  form-inline" method="post" action="{:U('Attendance/index')}">
            <div class="form-group">
                <label class="sr-only">上周相关问题落实和解决情况</label>
                <input type="text" name="work_date" class="input-xt input-deptname form-control WdatePicker" onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM'})" value="{$query}" placeholder="选择时间搜索..." style="width:200px;"/>
            </div>
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn btn-danger" href="{:U('Attendance/index')}">清空</a>
        </form> 
        <p>
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>月份</th>
                        <th>部门</th>
                        <th>姓名</th>
                        <th>应出勤</th>
                        <th>实出勤</th>
                        <th>旷工</th>
                        <th>查看</th>
                    </tr>
                </thead>
                <tbody>
                <foreach name="results" item="vo">
                    <tr>
                        <td>{$vo.work_date|substr=0,7}</td>
                        <td>{$vo.department_name}</td>
                        <td>{$vo.realname}</td>
                        <td>{$vo.ytobe}</td>
                        <td>{$vo.sreally}</td>
                        <td>{$vo.ab}</td>
                        <td>
                            <a href="{:U('Attendance/view',array('name'=>$vo['realname'],'work_date'=>$vo['work_date']))}">详情</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </p>
        <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script language="javascript" type="text/javascript" src="__PUBLIC__/js/My97DatePicker/WdatePicker.js"></script>
</body>
</html>